import { type ConnectorMetadata, ConnectorConfigFormItemType } from '@logto/connector-kit';

// 联麓SMS连接器元数据
export const defaultMetadata: ConnectorMetadata = {
  id: 'shlianlu-short-message-service',
  target: 'shlianlu-sms',
  platform: null,
  name: {
    en: 'Shlianlu Short Message Service',
    'zh-CN': '联麓短信服务',
  },
  logo: './logo.svg',
  logoDark: null,
  description: {
    en: 'Shlianlu provides cloud computing services to online businesses.',
    'zh-CN': '联麓是全球性的云服务提供商。',
  },
  readme: './README.md',
  formItems: [
    {
      key: 'MchId',
      label: 'Mch ID',
      type: ConnectorConfigFormItemType.Text,
      required: true,
      placeholder: '<mch-id>',
    },
    {
      key: 'AppId',
      label: 'App ID',
      type: ConnectorConfigFormItemType.Text,
      required: true,
      placeholder: '<app-id>',
    },
    {
      key: 'AppKey',
      label: 'App Key',
      type: ConnectorConfigFormItemType.Text,
      required: true,
      placeholder: '<app-key>',
    },
    {
      key: 'Version',
      label: 'Version',
      type: ConnectorConfigFormItemType.Text,
      required: true,
      placeholder: '<version>',
    },
    {
      key: 'Templates',
      label: 'Templates',
      type: ConnectorConfigFormItemType.Json,
      required: true,
      defaultValue: [
        {
          usageType: 'Generic',
          templateCode: '<template-code>',
        },
        {
          usageType: 'SignIn',
          templateCode: '<template-code>',
        },
        {
          usageType: 'Register',
          templateCode: '<template-code>',
        },
        {
          usageType: 'ForgotPassword',
          templateCode: '<template-code>',
        },
        {
          usageType: 'OrganizationInvitation',
          templateCode: '<template-code>',
        },
        {
          usageType: 'UserPermissionValidation',
          templateCode: '<template-code>',
        },
        {
          usageType: 'BindNewIdentifier',
          templateCode: '<template-code>',
        },
        {
          usageType: 'MfaVerification',
          templateCode: '<template-code>',
        },
      ],
    },
  ],
};
